﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using BeautyTech.Core.Domain.Catalogs;

namespace BeautyTech.Services.Catalogs
{
    public interface IProductService
    {
        /// <summary>
        /// Gets product
        /// </summary>
        /// <param name="productId">Product identifier</param>
        /// <returns>Product</returns>
        Product GetProductById(int productId);

        /// <summary>
        /// Gets products by identifier
        /// </summary>
        /// <param name="productIds">Product identifiers</param>
        /// <returns>Products</returns>
        IList<Product> GetProductsByIds(int[] productIds);

        /// <summary>
        /// Gets product by Reference
        /// </summary>
        /// <param name="reference">Product Reference</param>
        /// <returns>Product</returns>
        Product GetProductByReference(string reference);

        #region Related Products

            /// <summary>
            /// Deletes a related product
            /// </summary>
            /// <param name="relatedProduct">Related product</param>
            void DeleteRelatedProduct(RelatedProduct relatedProduct);

            /// <summary>
            /// Gets a related product collection by product identifier
            /// </summary>
            /// <param name="productId1">The first product identifier</param>
            /// <param name="showHidden">A value indicating whether to show hidden records</param>
            /// <returns>Related product collection</returns>
            IList<RelatedProduct> GetRelatedProductsByProductId1(int productId1, bool showHidden = false);

            /// <summary>
            /// Gets a related product
            /// </summary>
            /// <param name="relatedProductId">Related product identifier</param>
            /// <returns>Related product</returns>
            RelatedProduct GetRelatedProductById(int relatedProductId);

            /// <summary>
            /// Inserts a related product
            /// </summary>
            /// <param name="relatedProduct">Related product</param>
            void InsertRelatedProduct(RelatedProduct relatedProduct);

            /// <summary>
            /// Updates a related product
            /// </summary>
            /// <param name="relatedProduct">Related product</param>
            void UpdateRelatedProduct(RelatedProduct relatedProduct);

        #endregion
    }
}
